<template>
  <div>
    <table border=1>
      <tr>
        <td>年级</td>
        <td>课程</td>
      </tr>
      <tr v-for='i in courselist'>
        <td>{{ i.name }}</td>
        <td>
          <table>
            <tr>
              <td v-for='j in i.courses'>{{ j.name }}</td>
            </tr>
          </table>
        </td>
      </tr>
    </table>
  </div>
</template>
<script>
export default {
  data() {
    return {
      courselist: []
    }
  },
  methods: {
    getList() {
      this.axios.get('showCourse/').then(res => {
        this.courselist = res.data.list
      })
    }
  },
  mounted() {
    this.getList()
  },
}
</script>
<style lang="">

</style>
